{extend name="public:base" /}
{block name="content"}
<div class="page-header">
	<h1>
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$crumbs}
		</small>			
	
	</h1>
</div>

<div class="row">
	<div class="col-xs-12">	
		
		<div class="form-horizontal">
			
			{if condition="$Request.param.id"}
			<input name="id" type="hidden" value="{$Request.param.id}" />
			{/if}
			
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left"> * 名称 </label>
			<div class="col-sm-11">
				<div class="clearfix">
				<input name="name" class="col-xs-10 col-sm-5"  value="{$d.name|default=''}" type="text">
				</div>
			</div>
			</div>
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-1 control-label">状态</label>
				<div class="col-sm-11">
					<label class="radio-inline">
					<input type="radio" checked="checked" value="1" name="status">开启</label>
					<label class="radio-inline">
					<input type="radio" value="0" name="status">关闭</label>
				</div>
			</div>			
			
			
		
			
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left"> </label>	
				<div class="col-sm-11">
					<input id="send" name="send" type="submit" value="提交" class="btn btn-primary" />
				</div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}

<script>

var back_index="{:url('GoodsType/index')}";

$('#send').click(function(){
	$.post(
		'{$action}',
		$("input[type='text'],input[type='hidden'],input[type='radio']:checked"),
		function(d){
			art_dialog(d,back_index);
		}
	);
});
$(function(){	

Oscshop.setValue("status", {$d.status|default=1});

}); 
</script>							
{/block}